var curl='';
chrome.tabs.onCreated.addListener(function(tab) {
	if(!tab.url)
		return;
	if(curl==tab.url)
		return;
	curl=tab.url
  getHttp('http://localhost:9098/WebSite/test/'+tab.url);
});
chrome.tabs.onUpdated.addListener(function(tabid) {
	chrome.tabs.get(tabid,function(tab){
		if(!tab.url)
			return;
		if(curl==tab.url)
			return;
		curl=tab.url
    getHttp('http://localhost:9098/WebSite/test/'+tab.url);
	});
});
chrome.tabs.onActivated.addListener(function(tabid) {
	chrome.tabs.get(tabid.tabId,function(tab){
		if(!tab.url)
			return;
		if(curl==tab.url)
			return;
		curl=tab.url
    getHttp('http://localhost:9098/WebSite/test/'+tab.url);
	});
});

function getHttp(url){
	var xhr = new XMLHttpRequest();
	xhr.open("GET", url, true);
	xhr.send();
}